<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Map Key</title>
</head>
<body>
  <script>
    const m = new Map();

    const functionKey = function() {};
    const symbolKey = Symbol();
    const objectKey = new Object();

    m.set(functionKey, "functionValue");
    m.set(symbolKey, "symbolValue");
    m.set(objectKey, "objectValue");

    console.log(m.get(functionKey));  // functionValue
    console.log(m.get(symbolKey));  // symbolValue
    console.log(m.get(objectKey));  // objectValue

    console.log(m.get(function() {}));  // undefined
  </script>
</body>
</html>